Tables [dbo].[AddressToUse]
Properties
PropertyValue
Created10:31:13 AM Tuesday, March 02, 2010
Last Modified11:40:00 AM Monday, February 20, 2012
Columns
NameData TypeMax Length (Bytes)Allow NullsDefault
Cluster Primary Key PK_AddressToUse: ContactKey\CommunicationReasonKeyForeign Keys FK_AddressToUse_ContactMain: [dbo].[ContactMain].ContactKeyContactKeyuniqueidentifier16
No
Cluster Primary Key PK_AddressToUse: ContactKey\CommunicationReasonKeyForeign Keys FK_AddressToUse_CommunicationReasonRef: [dbo].[CommunicationReasonRef].CommunicationReasonKeyCommunicationReasonKeyuniqueidentifier16
No
Foreign Keys FK_AddressToUse_FullAddress: [dbo].[FullAddress].FullAddressKeyFullAddressKeyuniqueidentifier16
No
Foreign Keys FK_AddressToUse_FullAddress_SeasonalRevertFullAddress: [dbo].[FullAddress].SeasonalRevertFullAddressKeySeasonalRevertFullAddressKeyuniqueidentifier16
Yes
FullAddressTextnvarchar(1000)2000
Yes
IsOverriddenbit1
No
((0))
MarkedForDeleteOndatetime8
Yes
Indexes Indexes
NameColumnsUnique
Cluster Primary Key PK_AddressToUse: ContactKey\CommunicationReasonKeyPK_AddressToUseContactKey, CommunicationReasonKey
Yes
Foreign Keys Foreign Keys
NameColumns
FK_AddressToUse_CommunicationReasonRefCommunicationReasonKey->[dbo].[CommunicationReasonRef].[CommunicationReasonKey]
FK_AddressToUse_ContactMainContactKey->[dbo].[ContactMain].[ContactKey]
FK_AddressToUse_FullAddressFullAddressKey->[dbo].[FullAddress].[FullAddressKey]
FK_AddressToUse_FullAddress_SeasonalRevertFullAddressSeasonalRevertFullAddressKey->[dbo].[FullAddress].[FullAddressKey]
SQL Script
CREATE TABLE [dbo].[AddressToUse]
(
[ContactKey] [uniqueidentifier] NOT NULL,
[CommunicationReasonKey] [uniqueidentifier] NOT NULL,
[FullAddressKey] [uniqueidentifier] NOT NULL,
[SeasonalRevertFullAddressKey] [uniqueidentifier] NULL,
[FullAddressText] [nvarchar] (1000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[IsOverridden] [bit] NOT NULL CONSTRAINT [DF_AddressToUse_IsOverridden] DEFAULT ((0)),
[MarkedForDeleteOn] [datetime] NULL
) ON [PRIMARY]

GO
ALTER TABLE [dbo].[AddressToUse] ADD CONSTRAINT [PK_AddressToUse] PRIMARY KEY CLUSTERED ([ContactKey], [CommunicationReasonKey]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[AddressToUse] ADD CONSTRAINT [FK_AddressToUse_CommunicationReasonRef] FOREIGN KEY ([CommunicationReasonKey]) REFERENCES [dbo].[CommunicationReasonRef] ([CommunicationReasonKey])
GO
ALTER TABLE [dbo].[AddressToUse] ADD CONSTRAINT [FK_AddressToUse_ContactMain] FOREIGN KEY ([ContactKey]) REFERENCES [dbo].[ContactMain] ([ContactKey])
GO
ALTER TABLE [dbo].[AddressToUse] ADD CONSTRAINT [FK_AddressToUse_FullAddress] FOREIGN KEY ([FullAddressKey]) REFERENCES [dbo].[FullAddress] ([FullAddressKey])
GO
ALTER TABLE [dbo].[AddressToUse] ADD CONSTRAINT [FK_AddressToUse_FullAddress_SeasonalRevertFullAddress] FOREIGN KEY ([SeasonalRevertFullAddressKey]) REFERENCES [dbo].[FullAddress] ([FullAddressKey])
GO
Uses
Used By